package com.设计模式.抽象工厂模式;

/**
 * @author Fitch
 */
public class ShapeFactory extends AbstractFactory {
    @Override
    public Color getColor(String colorType) {
        return null;
    }

    @Override
    public Shape getShape(String shapeType) {
        if(shapeType == "rectangle"){
            return new Rectangle();
        }else if(shapeType == "square"){
            return new Square();
        }else if(shapeType =="circle"){
            return new Circle();
        }
        return null;
    }
}
